Use this function as a building block in complex expressions which need a tool for picking elements using a random generator from a list or lists.
(setq pat1 '(a a b c c d e f g h))
(setq pat2 '((a b a b c d) (a b e b c d) (e f g h)))
(pick-rnd .56 :content 2 pat1)
=> (a c)
(pick-rnd .56 :list 2 pat2)
=> ((a b a b c d) (a b a b c d))
(pick-rnd .56 :content 2 pat2)
=> ((a b) (d b) (h f))
(pick-rnd .56 :content '(2 3 3) pat2)
=> ((a b) (d b b) (h f h))
In these examples the type parameter offers the choice of :content and :list options. The :content option enables different elements to picked from multiple lists. The :list option enables a single element or set of elements to be picked from multiple lists.
(pick-rnd .56 :list 2 pat2)
=> ((a b a b c d) (a b a b c d))
The random seed enables the composer to recapture a particular choice. Setting the random seed to nil disables this facility. The count parameter enables the number of elements picked to be defined.